#pragma once
#include<stdio.h>
#include<stdlib.h>

typedef struct dlist
{
	struct dlist* next;
	struct dlist* prev;
	int data;
}dlist;

dlist* ListInit();
dlist* buynewnode(int x);
dlist* ListFind(dlist* phead, int pos);
void ListPrint(dlist* phead);
void DListPushBack(dlist** pphead, int x);
void DListPushFront(dlist** pphead, int x);
void DListPopBack(dlist** pphead);
void DListPopFront(dlist** pphead);
void DListInsert(dlist** pphead, int pos, int x);
void DListDel(dlist** pphead, int pos);